<?php
/**
 * 促销优惠模型
 *
 * 
 *
 *
 */
defined('InShopNC') or exit('Access Invalid!');
class discount_promotionModel extends Model {
    
    public function __construct() {
        parent::__construct('discount_promotion');
    }
    
    public function getDiscountPromotionList($condition=array()){
        return $this->table('discount_promotion')->where($condition)->order("pro_id desc")->select();
    }
    public function getDiscountPromotion($condition=array()){
        return $this->table('discount_promotion')->where($condition)->find();
    }
    
    public function saveDiscountPromotion($data){
        $result = $this->table('discount_promotion')->insert($data);
        return $result;
    }
    
    public function delDiscountPromotion($condition){
        $result = $this->where($condition)->delete();
        return $result;
    }
    
    public function updateDiscountPromotion($condition,$update){
        $result = $this->table('discount_promotion')->where($condition)->update($update);
        return $result;
    }
}